import type { CascaderProps } from 'element-plus';

export const urls = {
  //系统管理
  department: '/system/department',
  user: '/system/user',
  role: '/system/role',
  permission: '/system/permission',
  menu: '/system/role/menu',
  operation: '/system/operation',
  dictionary: '/system/dictionary',
  certification: '/person/certification',
  fileInfo: '/base/file/fileInfo',
  uploadOne: '/api/file/fileInfo/uploadOne',
  appendOne: '/api/file/fileInfo/appendOne',
  //流程管理
  deployment: '/flowable/deployment',
  processDefinition: '/flowable/processDefinition',
  processInstance: '/flowable/processInstance',
  taskInstance: '/flowable/task',
  leave: '/flowable/form/leave',
  asmePersonInfo: '/asmePerson/asmePersonInfo',
  //人员管理
  ndePersonCertification: '/person/ndePersonCertification',
  ndePersonOperationRecord: '/person/ndePersonOperationRecord',
  //耗材管理
  consumableOverview: '/consumable/consumableOverview',
  //设备管理
  equipmentUtProbeType: '/equipment/utProbe/utProbeType',
  equipmentUtProbeDetail: '/equipment/utProbe/utProbeDetail',
  //项目管理
  projectProduction: '/project/production',
  projectProject: '/project/project',
  projectNdeProcedure: '/project/ndeProcedure',
  projectWeldList: '/project/weldList',
  //无损报告
  ndeCommissionNdeCommission: '/ndeReport/ndeCommission',
  ndeReportRejectPart: '/ndeReport/rejectPart',
  ndeReportNdeDefect: '/ndeReport/ndeDefect',
  ndeReportReviewRecord: '/ndeReport/reviewRecord',
  ndeReportPtRecord: '/ndeReport/ptRecord',
  ndeReportMtRecord: '/ndeReport/mtRecord',
  ndeReportUtRecord: '/ndeReport/utRecord',
  ndeReportRtRecord: '/ndeReport/rtRecord',
  ndeReportChRecord: '/ndeReport/chRecord',
  ndeReportProcessFlow: '/ndeReport/processFlow',
  //美标人员
  asmePersonCertification: '/asmePerson/asmePersonCertification',
  asmePersonTrainCourse: '/asmePerson/asmePersonTrainCourse',
  asmePersonTrainRecord: '/asmePerson/asmePersonTrainRecord',
  asmePersonTrainInstructor: '/asmePerson/asmePersonTrainInstructor',
  asmePersonExamContent: '/asmePerson/asmePersonExamContent',
  //知识文档
  knowledgeStandard: '/knowledge/standard',
  //基础设施
  infrastructureRelation: '/infrastructure/relation',

  //采购管理
  purchaseProduction: '/purchase/production',
  purchaseProductionStatus: '/purchase/productionStatus',

  //检测工艺
  techniquePtTechnique: '/technique/ptTechnique',
  techniqueMtTechnique: '/technique/mtTechnique',
  techniqueUtTechnique: '/technique/utTechnique',
  techniqueUtTechniqueScanPlan: '/technique/utTechnique/utScanPlan',
  techniqueRtTechnique: '/technique/rtTechnique',

  // 大屏展示
  bigScreenNdeReportProcess: '/bigScreen/ndeReportProcess'
};

const prefix = 'ROLE_';
export const roles = {
  superAdmin: prefix + '超级管理员',
  admin: prefix + '管理员',
  loginUser: prefix + '登录用户',
  utOperater: prefix + '超声检测操作员',
  rtOperater: prefix + '射线检测操作员',
  mtOperater: prefix + '磁粉检测操作员',
  ptOperater: prefix + '渗透检测操作员',
  ltOperater: prefix + '泄漏检测操作员',
  etOperater: prefix + '涡流检测操作员',
  vtOperater: prefix + '目视检测操作员'
};

export const cascaderProps: CascaderProps = {
  expandTrigger: 'hover', //当鼠标放置时展开菜单
  checkStrictly: true, //可以选择各个节点的值
  label: 'label', //用来建立label显示的内容
  value: 'id', //用来定义下来值对应的字段
  emitPath: false //false只传递自节点的值，true传递全部链条的值
};

export const baseUrl = computed(() => (import.meta.env.MODE === 'development' ? '/apDev' : '/api'));
